Page({
  data: {
    openid: ''
  },
  onLoad: function (options) {
    let userInfo = wx.getStorageSync('userInfo')
    let openid = userInfo.openid
    this.setData({
      userInfo: userInfo,
      openid: openid
    })
    console.log(`分享者的openid: ${openid}`)
    console.log(userInfo)
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function (e) {
    let that = this
    return {
      title: '有张时光机',
      path: `/page/activity/activity?openid=${that.data.openid}`
    }
  }
})